using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

public class UI_SHOW : MonoBehaviour
{
    public List<GameObject> OBJ;
    private Coroutine   ien_a;
    public KeyCode key;
    // Start is called before the first frame update
    void Start()
    {
        ien_a = StartCoroutine(Is_show());
    }

    // Update is called once per frame
    void Update()
    {
        
    }


   public  IEnumerator  Is_show()
    {
        yield return new WaitForSeconds(0.5f);
        while (true)
        {
            if (Input.GetKeyDown(key))
            {
                for (int I = 0; I < OBJ.Count; I++)
                {
                    OBJ[I].SetActive(!(OBJ[I].activeSelf));
                }
            }
             yield return null;
        }
    
    }
}
